﻿using System;

namespace SmartFront.Toolkit.ActionFramework
{
    /// <summary>
    /// Interface defines the required signature for asynchronous actions.
    /// </summary>
    /// <typeparam name="TResult">The type of the result.</typeparam>
    public interface IAsynchronousAction<TResult>
    {
        /// <summary>
        /// Executes the action.
        /// </summary>
        void ExecuteAsync();

        /// <summary>
        /// Raised when the processing of the action has completed successfully/Failed.
        /// </summary>
		event EventHandler<ActionResultEventArgs<TResult>> Completed;
    }
}